-- GENERATED SPELL FOR [Kandaar] --


function spell0_20374(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15589,pUnit)
pUnit:RegisterEvent('Sorts_20374', 579, 1)
end

function spell1_20374(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(13736,pUnit)
pUnit:RegisterEvent('Sorts_20374', 2000, 1)
end

function Sorts_20374(pUnit, Event)
local choix_sorts_20374 = math.random(0, 1)
if choix_sorts_20374 == 0 then
pUnit:RegisterEvent('spell0_20374', 1, 1)
end
if choix_sorts_20374 == 1 then
pUnit:RegisterEvent('spell1_20374', 1, 1)
end
end

function mob20374_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20374', math.random(1500, 3000), 1)
end

function mob20374_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20374_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20374_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20374, 1, 'mob20374_Action')
RegisterUnitEvent(20374, 2, 'mob20374_Leave')
RegisterUnitEvent(20374, 3, 'mob20374_Kill')
RegisterUnitEvent(20374, 4, 'mob20374_Die')
